<?php


require_once(sfConfig::get('sf_app_lib_dir').'/common/html/tags/body/component/DivTag.php');
require_once(sfConfig::get('sf_app_lib_dir').'/common/html/tags/body/component/ObjectString.php');
require_once(sfConfig::get('sf_app_lib_dir').'/common/html/tags/body/component/ImageTagAComponent.php');
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ManagerFooter
 *
 * @author jhonny
 */
class ManagerBodyFooter {
    public function __construct() {
        $this->initComponent();
    }
    private function initComponent() {

    }
    private function getLinks() {
        $value='';
        $divLink = new DivTag();
        $divLink->setId("footerLink");

        $value.=$this->builtLink("queest1c.php", "¿QUÉ ES T1C?").' | '.
                $this->builtLink("ayuda.php", "AYUDA").' | '.
                $this->builtLink("contacto.php", "CONTACTO").'<br/>'.
                $this->builtLink("politicasdeprivacidad.php", "POLÍTICAS DE PRIVACIDAD").' | '.
                $this->builtLink("condicionesdeuso.php", "CONDICIONES DE USO").'<br/>';
        ;
        $value.=$this->getBuilderPage();
        $divLink->setComponent(new ObjectString($value));
        return $divLink->toString();
    }
    private function getStrLogo() {
        $value='';
        $divLink = new DivTag();
        $divLink->setId("footerLogo");
        $image = new ImageTagAComponent();
        $image->setHref("#");
        $image->setSource("../webdata/images/commons/logofooter.png");
        $divLink->setComponent($image);
        return $divLink->toString();
    }
   
    private function builtLink($href,$text) {
        $value='';
        $value.='<A href="'.$href.'">'.$text.'</A>';
        return $value;
    }

    public function getBuilderPage() {
        $value='';
        $div = new DivTag();
        $div->setId("copiright");
        $text = 'Copyright 2011 '.$this->builtLink("http://www.choosoft.com", "CHOOsoft")
                .'. All Rights reserved';
        $div->setComponent(new ObjectString($text));

        $value .= $div->toString();
        return $value;
    }
    public function toString() {
        $value='';
                $value.='<div id="footer">
';
                $value.='<div id="footerContent">
';
        $value.=$this->getStrLogo();
        $value.=$this->getLinks();
        $value .= '</div>';
      $value .= '</div>';

        return $value;
    }
}
?>
